﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;

using MyUtils.Performance;

namespace PerformanceTests
{
	static class Program
	{
		static void Main()
		{
			ProfilingHelper.EnableProfiling();

			using(P.S("Section1"))
			{
				using (P.S("Section1_1"))
				{
					using (P.S("Section1_1_1"))
					{

					}
				}
				using (P.S("Section1_2"))
				{

				}
				
			}

			Console.WriteLine(P.D.GetLog());

			ProfilingHelper.ShowLogModal();
		}

		static void Main1()
		{
			ProfilingHelper.EnableProfiling();

			using(P.S("Main"))
			{
				Thread.Sleep(10);
				using (P.S("Main_sub1"))
				{
					Thread.Sleep(10);
				}
				Thread.Sleep(10);
				using (P.S("Main_sub2"))
				{
					using (P.S("Main_sub2_subsub1"))
					{
						Thread.Sleep(10);
					}
				}
			}
			using (P.S("Main2"))
			{
				Thread.Sleep(10);
			}

			P.D.ShowLogModal();
			//Console.WriteLine(ProfilingHelper.GetLog());
		}

	}
}
